<template>
  <div class="out">
    <zHeader pageTitle="房屋合同"></zHeader>
    
    <div id="demo"></div>
  </div>
</template>

<script setup>
  import Pdfh5 from 'pdfh5';

  let pdfh5 = null
  const initPdfh5 = () => {
    pdfh5 = new Pdfh5("#demo", {
      pdfurl: "/api/pdfh5/git.pdf",
	  });

    pdfh5.on("complete", function (status, msg, time) {
      console.log("状态：" + status + "，信息：" + msg + "，耗时：" + time + "毫秒，总页数：" + this.totalNum)
      //禁止手势缩放
      // pdfh5.zoomEnable(false);
	  })
  }

  onMounted(() => {
    initPdfh5()
  })
</script>

<style lang="scss" scoped>
@import "pdfh5/css/pdfh5.css";
.out {
  height: 100dvh;
  width: 100vw;

  #demo {
    height: calc(100dvh - 50px);
  }
}
</style>